{% extends "base.html" %}
{% load adminmedia admin_list i18n %}
{% block coltype %}flex{% endblock %}
{% block content %}
<div id="content-main">
<div class="module">
<h2>Statistiques BD</h2>
<style type="text/css">
<!--
td.value {
	background-image: url(media/img/gridline58.gif);
	background-repeat: repeat-x;
	background-position: left top;
	border-left: 1px solid #e5e5e5;
	border-right: 1px solid #e5e5e5;
	padding:0;
	border-bottom: none;
	background-color:transparent;
}
td {
	padding: 4px 6px;
	border-bottom:1px solid #e5e5e5;
	border-left:1px solid #e5e5e5;
	background-color:#fff;
}
body {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 80%;
}
td.value img {
	vertical-align: middle;
	margin: 5px 5px 5px 0;
}
th {
	text-align: left;
	vertical-align:top;
}
td.last {
	border-bottom:1px solid #e5e5e5;
}
td.first {
	border-top:1px solid #e5e5e5;
}
.auraltext
{
   position: absolute;
   font-size: 0;
   left: -1000px;
}
table {
	background-image:url(media/img/bg_fade.png);
	background-repeat:repeat-x;
	background-position:left top;
	width: 33em;
}
caption {
	font-size:90%;
	font-style:italic;
}

-->
</style>
<p>
    <table cellspacing="0" cellpadding="0" summary="Année {{year}}">
      <caption align="top">{{year}}: Top 10 <br /><br /></caption>
      {% for item in top10 %}
      <tr>
        <td class="first">{{ item.ob.label }}</td>
        <td class="value first"><img src="media/img/bar.png" alt="" width="{{ item.nb }}" height="16" />{{ item.nb }}</td>
      </tr>
      {% endfor %}
    </table>
<p>
    <table cellspacing="0" cellpadding="0" summary="Année {{year}}">
      <caption align="top">{{year}}: Top 10 corrigé (pondéré par le nombre de tomes)<br /><br /></caption>
      {% for item in top10n %}
      <tr>
        <td class="first">{{ item.ob.label }}</td>
        <td class="value first"><img src="media/img/bar.png" alt="" width="{{ item.nb }}" height="16" /></td>
      </tr>
      {% endfor %}
    </table>


<p>
    <table cellspacing="0" cellpadding="0" summary="Année {{year}}">
      <caption align="top">{{year}}: nombre d'emprunts par mois<br /><br /></caption>
      {% for mois in mois_list %}
      <tr>
        <td class="first">{{ mois.name }}</td>
        <td class="value first"><img src="media/img/bar.png" alt="" width="{{ mois.size }}" height="16" />{{ mois.value }}</td>
      </tr>
      {% endfor %}
    </table>

<p>
    <table cellspacing="0" cellpadding="0" summary="Année">
      <caption align="top">Nombre d'emprunts par an<br /><br /></caption>
      {% for an in an_list %}
      <tr>
        <td class="first">{{ an.name }}</td>
        <td class="value first"><img src="media/img/bar.png" alt="" width="{{ an.size }}" height="16" />{{ an.value }}</td>
      </tr>
      {% endfor %}
    </table>

</div>
</div>
{% endblock %}
